<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class GroupElements</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> GroupElements</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class GroupElements.php</p>
<p class="description"><p>Class that manages the group elements of a project.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Jose Oliveira &lt;<a href="mailto:jafo@ua.pt">jafo@ua.pt</a>&gt; 2012</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_serverResources---includes---classes---GroupElements.php.html">/serverResources/includes/classes/GroupElements.php</a> (line <span class="field">10</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																								<div class="method-definition">
					<img src="../media/images/Constructor.png" alt=" "/>
											<span class="method-result">GroupElements</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$groupName</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member1</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member2</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member3</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#assIDS" title="details" class="method-name">assIDS</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#deleteGroup" title="details" class="method-name">deleteGroup</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#getAssociateID" title="details" class="method-name">getAssociateID</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$userID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#getElemsAssID" title="details" class="method-name">getElemsAssID</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#getGpIDAssID" title="details" class="method-name">getGpIDAssID</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$assID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#getGroups" title="details" class="method-name">getGroups</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#getNumElem" title="details" class="method-name">getNumElem</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#groupOf3BySystem" title="details" class="method-name">groupOf3BySystem</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$groupName</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#insert2Elements" title="details" class="method-name">insert2Elements</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#insert3Elements" title="details" class="method-name">insert3Elements</a>
										()
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">integer</span>
										<a href="#randomGroups" title="details" class="method-name">randomGroups</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">array</span>
										<a href="#showGroupElements" title="details" class="method-name">showGroupElements</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Constructor.png" />
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">26</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		<span class="method-result">GroupElements</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$groupName</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member1</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member2</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$member3</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$groupName</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$projectID</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$member1</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$member2</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$member3</span>			</li>
				</ul>
		
			
	</div>
<a name="methodassIDS" id="assIDS"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">assIDS</span> (line <span class="line-number">842</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that gets an groupID and returns all the associateIDs of the elements of that group</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			assIDS
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$groupID</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddeleteGroup" id="deleteGroup"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">deleteGroup</span> (line <span class="line-number">307</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method used to eliminate an group</p>
<p class="description"><p>return 0: it was not possible to delete the group  return 1: group deleted successfully  return 2: it is not possible to delete the group because the elements already had interactions</p></p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			deleteGroup
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$groupID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetAssociateID" id="getAssociateID"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getAssociateID</span> (line <span class="line-number">566</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that returns the associate ID of an user in a certain project</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			getAssociateID
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$userID</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$userID</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$projectID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetElemsAssID" id="getElemsAssID"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getElemsAssID</span> (line <span class="line-number">904</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ethod that gets an groupID and returns all the associateIDs of the elements of that group</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getElemsAssID
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$groupID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetGpIDAssID" id="getGpIDAssID"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getGpIDAssID</span> (line <span class="line-number">806</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that gets an associateID and returns the groupID of the group to which the user belongs</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			getGpIDAssID
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$assID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$assID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetGroups" id="getGroups"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getGroups</span> (line <span class="line-number">508</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that returns info about the groups created in a project</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getGroups
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$projectID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetNumElem" id="getNumElem"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">getNumElem</span> (line <span class="line-number">873</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that returns the number of elements of an group</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			getNumElem
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$groupID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgroupOf3BySystem" id="groupOf3BySystem"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">groupOf3BySystem</span> (line <span class="line-number">1026</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that helps to create a random group of 3 users</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			groupOf3BySystem
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$groupName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$projectID</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$groupName</span>			</li>
				</ul>
		
			
	</div>
<a name="methodinsert2Elements" id="insert2Elements"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">insert2Elements</span> (line <span class="line-number">51</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that inserts 2 elements in a certain group  If return 1, the elements were sucessfully to the group.</p>
<p class="description"><p>If return 2, there is at least one element that haven't activate his participation in the project</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			insert2Elements
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodinsert3Elements" id="insert3Elements"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">insert3Elements</span> (line <span class="line-number">90</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that inserts 3 elements in a certain group</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			insert3Elements
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodrandomGroups" id="randomGroups"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">randomGroups</span> (line <span class="line-number">184</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that creates groups automatically</p>
<p class="description"><p>In order to run properly, it's demanded that there is at least 2 users without group  It is advisable that the project administrator only uses this optin after invite all the  elements to his project, in order to get more efficient results</p><p>return 0 -&gt; unexpected failure  return 1 -&gt; groups created with success  return 2 -&gt; error. It's needed to have at least 2 users without group</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			randomGroups
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$projectID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$projectID</span>			</li>
				</ul>
		
			
	</div>
<a name="methodshowGroupElements" id="showGroupElements"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">showGroupElements</span> (line <span class="line-number">535</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Method that returns the associateIDs of elements of an group</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			showGroupElements
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$groupID</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$groupID</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Fri, 22 Feb 2013 05:33:57 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>